FrameLib  2.0
DSP processing with frames of arbitrary timing and length
FrameLib_SerialiseGraph.h
Go to the documentation of this file.
1 
2 #ifndef FrameLib_SerialiseGraph_h
3 #define FrameLib_SerialiseGraph_h
4 
5 #include "FrameLib_Multistream.h"
6 
14 
26 {
28 
37  struct Tagged
38  {
39  std::string mTag;
41  std::string mString;
42  std::vector<double> mVector;
43  };
44 
53  struct Connection
54  {
55  Connection(unsigned long objectIdx, long outIdx, long inIdx) :
56  mObjectIndex(objectIdx), mOutputIndex(outIdx), mInputIndex(inIdx) {}
57 
58  unsigned long mObjectIndex;
59  unsigned long mOutputIndex;
60  unsigned long mInputIndex;
61  };
62 
63  std::string mObjectType;
64  std::vector<Tagged> mParameters;
65  std::vector<std::vector<double>> mInputs;
66  std::vector<Connection> mConnections;
67 
68  unsigned long mNumStreams;
69 };
70 
71 void serialiseGraph(std::vector<FrameLib_ObjectDescription>& objects, FrameLib_Multistream *requestObject);
72 ExportError exportGraph(FrameLib_Multistream *requestObject, const char *path, const char *className);
73 
74 #endif
DataType mType
Definition: FrameLib_SerialiseGraph.h:40
FrameLib_ObjectDescription()
Definition: FrameLib_SerialiseGraph.h:27
a data-based representation of a FrameLib object in a network, used for serialisation purposes...
Definition: FrameLib_SerialiseGraph.h:25
DataType
Definition: FrameLib_Types.h:55
void serialiseGraph(std::vector< FrameLib_ObjectDescription > &objects, FrameLib_Multistream *requestObject)
Definition: FrameLib_SerialiseGraph.cpp:149
Connection(unsigned long objectIdx, long outIdx, long inIdx)
Definition: FrameLib_SerialiseGraph.h:55
Definition: FrameLib_SerialiseGraph.h:13
std::vector< std::vector< double > > mInputs
Definition: FrameLib_SerialiseGraph.h:65
ExportError
Definition: FrameLib_SerialiseGraph.h:13
Definition: FrameLib_SerialiseGraph.h:13
Definition: FrameLib_SerialiseGraph.h:13
unsigned long mOutputIndex
Definition: FrameLib_SerialiseGraph.h:59
a description of a single tagged string or vector of doubles.
Definition: FrameLib_SerialiseGraph.h:37
a description of a connection to the input of the described object.
Definition: FrameLib_SerialiseGraph.h:53
std::string mTag
Definition: FrameLib_SerialiseGraph.h:39
ExportError exportGraph(FrameLib_Multistream *requestObject, const char *path, const char *className)
Definition: FrameLib_SerialiseGraph.cpp:327
std::vector< double > mVector
Definition: FrameLib_SerialiseGraph.h:42
std::vector< Tagged > mParameters
Definition: FrameLib_SerialiseGraph.h:64
std::string mObjectType
Definition: FrameLib_SerialiseGraph.h:63
std::string mString
Definition: FrameLib_SerialiseGraph.h:41
unsigned long mInputIndex
Definition: FrameLib_SerialiseGraph.h:60
unsigned long mObjectIndex
Definition: FrameLib_SerialiseGraph.h:58
std::vector< Connection > mConnections
Definition: FrameLib_SerialiseGraph.h:66
a abstract class proving multi-stream connnections and the means to the number of streams in a networ...
Definition: FrameLib_Multistream.h:29
unsigned long mNumStreams
Definition: FrameLib_SerialiseGraph.h:68